<h1>部门管理 - <span id="secondHeading">员工联系表</span></h1>
<TABLE border="0" id="LIST_TB">
	<TR id="LIST_TB_TITLE">
	    <td>ID</td>
	    <td>姓名</td>
	    <td>角色</td>
	    <td>电话</td>
	    <td>分机</td>
	    <td>手机</td>
	    <td>小灵通</td>
	    <td>电子邮件</td>
	 </TR>
	 <%currentDepartment = ''%>
  	<%@departments.each do |department|%>
  	<%if !currentDepartment.eql? department.name%>
  	<%currentDepartment = department.name%>
  	<TR>
  	    <td colspan="8" align="center">部门：<%=department.name%></td>
  	</TR>
  	<%end%>
  	<%department.roles.each do |role|%>
  	<%role.accounts.each do |account|%>
  	<%if account.employee.state==1%>
  <TR id="LIST_TB_CONTENT1">
    <td><%=account.id%></td>
    <td><%=account.employee.name%></td>
    <td><%=role.name%></td>
    <td><%=account.employee.phone%></td>
    <td><%=account.employee.ext%></td>
    <td><%=account.employee.mobile%></td>
    <td><%=account.employee.lingtong%></td>
    <td><%=account.employee.email%></td>
  </TR>
  <%end%>
   <%end%>
   <%end%>
   <%end%>
</table>
<table>
        <tr>
                <td>
                        <input type="button" value="打印当前页" class="sub" onclick="openPrintWindow('LIST_TB')"/>
                        <input type="button" value="导出当前数据" class="sub" onclick="CellAreaExcel('LIST_TB')"/>
                </td>
        </tr>
</table>
